package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.ZtcConfigExample.E_APP_ID;
import static org.jsola.hr.example.ZtcConfigExample.E_NAME;
import static org.jsola.hr.example.ZtcConfigExample.E_OFFICIAL_KEY;
import static org.jsola.hr.example.ZtcConfigExample.E_RELEVANCY_COMPANY_ID;
import static org.jsola.hr.example.ZtcConfigExample.E_RELEVANCY_COMPANY_NAME;
import static org.jsola.hr.example.ZtcConfigExample.E_REMARK;
import static org.jsola.hr.example.ZtcConfigExample.E_SITE_NAME;
import static org.jsola.hr.example.ZtcConfigExample.M_APP_ID_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_APP_ID_NOT_NULL;
import static org.jsola.hr.example.ZtcConfigExample.M_NAME_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_NAME_NOT_NULL;
import static org.jsola.hr.example.ZtcConfigExample.M_OFFICIAL_KEY_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_OFFICIAL_KEY_NOT_NULL;
import static org.jsola.hr.example.ZtcConfigExample.M_RELEVANCY_COMPANY_ID_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_RELEVANCY_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.ZtcConfigExample.M_RELEVANCY_COMPANY_NAME_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_RELEVANCY_COMPANY_NAME_NOT_NULL;
import static org.jsola.hr.example.ZtcConfigExample.M_REMARK_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_SITE_NAME_MAX;
import static org.jsola.hr.example.ZtcConfigExample.M_SITE_NAME_NOT_NULL;
import static org.jsola.hr.example.ZtcConfigExample.N_APP_ID;
import static org.jsola.hr.example.ZtcConfigExample.N_NAME;
import static org.jsola.hr.example.ZtcConfigExample.N_OFFICIAL_KEY;
import static org.jsola.hr.example.ZtcConfigExample.N_RELEVANCY_COMPANY_ID;
import static org.jsola.hr.example.ZtcConfigExample.N_RELEVANCY_COMPANY_NAME;
import static org.jsola.hr.example.ZtcConfigExample.N_REMARK;
import static org.jsola.hr.example.ZtcConfigExample.N_SITE_NAME;

/**
 * 政企直通车配置
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【政企直通车配置】的参数")
@Data
public class ZtcConfigUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_APP_ID, example = E_APP_ID, required = true)
    @NotNull(message = M_APP_ID_NOT_NULL)
    @Length(max = 32, message = M_APP_ID_MAX)
    private String appId;

    @ApiModelProperty(notes = N_OFFICIAL_KEY, example = E_OFFICIAL_KEY, required = true)
    @NotNull(message = M_OFFICIAL_KEY_NOT_NULL)
    @Length(max = 32, message = M_OFFICIAL_KEY_MAX)
    private String officialKey;

    @ApiModelProperty(notes = N_SITE_NAME, example = E_SITE_NAME, required = true)
    @NotNull(message = M_SITE_NAME_NOT_NULL)
    @Length(max = 50, message = M_SITE_NAME_MAX)
    private String siteName;

    @ApiModelProperty(notes = N_RELEVANCY_COMPANY_ID, example = E_RELEVANCY_COMPANY_ID, required = true)
    @NotNull(message = M_RELEVANCY_COMPANY_ID_NOT_NULL)
    @Length(max = 2147483647, message = M_RELEVANCY_COMPANY_ID_MAX)
    private String relevancyCompanyId;

    @ApiModelProperty(notes = N_RELEVANCY_COMPANY_NAME, example = E_RELEVANCY_COMPANY_NAME, required = true)
    @NotNull(message = M_RELEVANCY_COMPANY_NAME_NOT_NULL)
    @Length(max = 2147483647, message = M_RELEVANCY_COMPANY_NAME_MAX)
    private String relevancyCompanyName;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 50, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;

    @ApiModelProperty(notes = "添加的租户Id")
    private String addSiteId;
}

